class Response:
    def __init__(self):
        self.code = 0
        self.data: object = None
        self.message = ''

    def successWithData(self, data):
        self.code = 0
        self.data = data
        self.message = 'OK'
        return self

    def success(self):
        self.code = 0
        self.message = 'OK'
        return self

    def error(self, msg):
        self.code = 500
        self.message = msg
        return self
